'use strict';
exports.main = async (event, context) => {
	//event为客户端上传的参数
	console.log('event : ', event)
	const CLEARAUTO = 'uni-id-task'; // 数据库名称
	const DEFAULTPER = 3; //	默认次数
	
	
	const DB = uniCloud.database();
	const DBCmd = DB.command;
	const CLEARAUTO_db = DB.collection(CLEARAUTO);
	
    await CLEARAUTO_db.where({per:DBCmd.lte(DEFAULTPER)}).update({per:DEFAULTPER})
	//返回数据给客户端
	return event
};
